Skip to main content

03-10 the-Select-Case

the Select Case​

The Select Case makes it possible to compare the value of a variable against multiple values without having to type the variable name every time. This is a purely syntactic feature that makes programming easier in certain cases. You can completely duplicate a Select-Case with an If-ElseIf-Then, but you may have to type more code.

TODO: add an example of a Select Case

Note that this section is fairly short. Logic structures are so prevalent in normal VBA code that should look for examples of these in the respective chapters instead of this section.